From: Morten Mjelva Date: Sun, 28 Aug 2011 20:14:15 +0000 (+0200) Subject: Make GridSearchResults take a grid as an optional parameter X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~7851 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=81cee34c171944f62db01be6cacd4c448894efe1;p=gnome-shell.git Make GridSearchResults take a grid as an optional parameter This is useful since contact search results use a custom grid https://bugzilla.gnome.org/show_bug.cgi?id=643018 --- diff --git a/js/ui/searchDisplay.js b/js/ui/searchDisplay.js index d1534afb1..580f410be 100644 --- a/js/ui/searchDisplay.js +++ b/js/ui/searchDisplay.js @@ -100,17 +100,17 @@ SearchResult.prototype = { }; -function GridSearchResults(provider) { - this._init(provider); +function GridSearchResults(provider, grid) { + this._init(provider, grid); } GridSearchResults.prototype = { __proto__: Search.SearchResultDisplay.prototype, - _init: function(provider) { + _init: function(provider, grid) { Search.SearchResultDisplay.prototype._init.call(this, provider); - this._grid = new IconGrid.IconGrid({ rowLimit: MAX_SEARCH_RESULTS_ROWS, - xAlign: St.Align.START }); + this._grid = grid || new IconGrid.IconGrid({ rowLimit: MAX_SEARCH_RESULTS_ROWS, + xAlign: St.Align.START }); this.actor = new St.Bin({ x_align: St.Align.START }); this.actor.set_child(this._grid.actor);